{% extends "user_inbox/base.html" %}
{% import "macros.html" as macros %}
{% block profilesection %}
    {% trans %}inbox - moderation queue{% endtrans %}
{% endblock %}
{% block inbox_content %}
    {% if request.user.new_response_count %}
        <p class="clear-messages"><a>{% trans %}Clear new notifications{% endtrans %}</a></p>
    {% endif %}
    <div class="messages">
    {% for message in messages %}{# messages are grouped by question, using the "nested_messages" #}
        <div class="message{% if message.is_new %} highlight new{% else %} seen{% endif %}"
            data-message-id="{{ message.id }}"
        >
            <h2 style="font-size: 1.4em">"{{ message.title.strip()|escape}}"</h2>
            {{ macros.inbox_message_snippet(message) }}
        </div>
        {# "nested" messages are further response messages to the same question #}
        {% for followup_message in message.followup_messages %}
            <div class="message{% if message.is_new %} highlight new{% else %} seen{% endif %}"
                data-message-id="{{ message.id }}"
            >
                {{ macros.inbox_message_snippet(followup_message) }}
            </div>
        {% endfor %}
    {% endfor %}
    </div>
{% endblock %}
